package com.ynr.user.model;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ynr.common.utils.BaseModel;

public class UserModel extends BaseModel {

	private static final long serialVersionUID = 1L;
	
	public interface LoginGroup{};
	
	private String user_id;
	
	private String nickname;
	
	private String name;
	
	private String avatar;
	
	@NotEmpty(groups={LoginGroup.class, CreateGroup.class})
	private String password;
	
	private String phone;
	
	@NotEmpty(groups={LoginGroup.class, CreateGroup.class})
	@Email
	private String email;
	
	private String salt;
	
	private int sex;
	
	private int status;
	
	private String idcard_num;
	
	public UserModel(){
		super();
	}

	public UserModel(String userId, String nickname, String name, String avatar, String password, String phone,
			String email, String salt, int sex, int status, String idcardNum) {
		super();
		this.user_id = userId;
		this.nickname = nickname;
		this.name = name;
		this.avatar = avatar;
		this.password = password;
		this.phone = phone;
		this.email = email;
		this.salt = salt;
		this.sex = sex;
		this.status = status;
		this.idcard_num = idcardNum;
	}

	public String getUser_id() {
		return this.user_id;
	}

	public void setUser_id(String userId) {
		this.user_id = userId;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getIdcard_num() {
		return idcard_num;
	}

	public void setIdcard_num(String idcard_num) {
		this.idcard_num = idcard_num;
	}
	
}